home *** CD-ROM | disk | FTP | other *** search
- Path: news.gate.net!!bcfreenet!z007400b
- From: z007400b@bcfreenet.seflin.lib.fl.us (Ralph Silverman)
- Newsgroups: comp.lang.c
- Subject: Re: Looking for a clear screen function
- Date: 7 Mar 1996 21:03:29 GMT
- Organization: SEFLIN Free-Net - Broward
- Message-ID: <4hniv1$8h6@news.seflin.lib.fl.us>
- References: <4gaeba$d9h@nkosi.well.com> <3129AC77.5F25@fokus.gmd.de> <TANMOY.96Feb20084655@qcd.lanl.gov> <mhoward-2102960702470001@port2.sniff.smallmedia.com> <312BE000.1401@post.drexel.edu>
- NNTP-Posting-Host: ns2.seflin.lib.fl.us
- X-Newsreader: TIN [version 1.2 PL2]
-
- Sean P Kelly (st94e485@post.drexel.edu) wrote:
- : > > In article <3129AC77.5F25@fokus.gmd.de> Watson <sayegh@fokus.gmd.de>
- : > > writes:
- : > > > Does anyone know of a clear screen function to use both in turboC++ on
- : > > > a PC and one to use in standard C for Unix machines
- : > >
- : > > #include<stdio.h>
- : > > for (int i=0;i<25;i++)
- : > > printf("\n");
- : > >
- : I'm not familiar with Turbo C++ for PC's, but for UNIX the simplest method is to
- : execute a shell command:
-
- : if (fork() == 0) {
- : execlp ("clear", "clear");
- : printf ("System error: execlp\n");
- : }
- : else wait (NULL);
-
- : If that doesn't work, try: execl ("path-to-clear", "clear");
-
- : Of course, for more elaborate screen manipulation, you can always use the curses
- : library.
-
- : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- : Sean P Kelly Drexel University
- : st94e485@post.drexel.edu Electrical Engineering
- : skipper@cyberspace.com
- :
- : "It's a rough old life, up here on the wagon"
- : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- --
- ***********begin r.s. response*************
-
- in (pc ms dr)dos...
- how about...
- system("@echo off");
- system("cls");
- ...
-
- ***********end r.s. response***************
- Ralph Silverman
- z007400b@bcfreenet.seflin.lib.fl.us
-
-